﻿using MyLifeVn.AddThis.Models;
using Orchard.ContentManagement.MetaData;
using Orchard.Data.Migration;
using Orchard.Core.Contents.Extensions;

namespace MyLifeVn.AddThis
{
    public class Migrations : DataMigrationImpl
    {
        public int Create()
        {
            SchemaBuilder.CreateTable("AddThisSettingsPartRecord",
                                      table => table
                                                   .ContentPartRecord()
                                                   .Column<string>("Script", column => column.Unlimited())
                );

            ContentDefinitionManager.AlterPartDefinition(typeof(AddThisPart).Name, builder => builder.Attachable());
            return 1;
        }
    }
}